<?php
/**
 * Created by PhpStorm.
 * User: XYX
 * Date: 2017/8/29
 * Time: 18:38
 */

namespace App\Api\Transformers;


use App\Consumer;
use League\Fractal\TransformerAbstract;

class TwitterConsumerTransformer extends TransformerAbstract
{
    public function transform(Consumer $item){
        return
            [
                'id'=>$item['id'],
                'consumer'=>$item['nickname'],
                'avatar'=>$item['avatar']
            ];
    }

}